package cn.edu.xmu.restfuldemo.model;

import lombok.Data;

import java.util.List;

@Data
public class OrderItem implements VoObject {
    private Integer goodsSkuId; //商品SKUID

    public void setGoodsSkuId(Integer goodsSkuId) {
        this.orderItemPo.setGoodsSkuId(goodsSkuId);
    }

    public void setQuantity(Integer quantity) {
        this.orderItemPo.setQuantity(quantity);
    }

    public void setCouponActivityId(Integer couponActivityId) {
        this.orderItemPo.setCouponActivityId(couponActivityId);
    }

    private Integer quantity; //数量
    private Integer couponActivityId;//优惠活动ID

    public Integer getId() {
        return orderItemPo.getId();
    }

    public Integer getOrderId() {
        return orderItemPo.getOrderId();
    }

    public Integer getGoodsSkuId() {
        return orderItemPo.getGoodsSkuId();
    }

    public Integer getQuantity() {
        return orderItemPo.getQuantity();
    }

    public Double getPrice() {
        return orderItemPo.getPrice();
    }

    public Double getDiscount() {
        return orderItemPo.getDiscount();
    }

    public String getName() {
        return orderItemPo.getName();
    }

    public Integer getCouponActivityId() {
        return orderItemPo.getCouponActivityId();
    }

    public Integer getBeShareId() {
        return orderItemPo.getBeShareId();
    }

    private OrderItemPo orderItemPo;

    public OrderItem() {
        this.orderItemPo = new OrderItemPo();
    }

    /**
     * 构造函数
     */
    public OrderItem(OrderItemPo orderItemPo) {
        this.orderItemPo = orderItemPo;
    }

    /**
     * 由OrderItem对象创建Vo对象
     */
    @Override
    public Object createVo(){
        return new OrderItemRetVo(this);
    }

    /**
     * 获得内部的代理对象
     * @return GoodsPo对象
     */
    public OrderItemPo getOrderItemPo(){
        return this.orderItemPo;
    }



    private List<OrderItem> orderItemList;

    public List<OrderItem> getOrderItemList() {
        return orderItemList;
    }

    public void setOrderItemList(List<OrderItem> orderItemList) {
        this.orderItemList = orderItemList;
    }


}
